package com.itheima.grow.model.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@AllArgsConstructor
@Data
public class EcocPo {

       private String xmlns;

       private Header Header;

       private Body Body;

        //XMLheader部分
        @NoArgsConstructor
        @AllArgsConstructor
        @Data
        public static class Header {

            private String IVIReferenceId;

            private String VersionNumberXsd;
        }


        //XMLbody部分
        @NoArgsConstructor
        @AllArgsConstructor
        @Data
        public static class Body {

            private CocDataGroup CocDataGroup;

            //body里面的CocDataGroup部分
            @NoArgsConstructor
            @AllArgsConstructor
            @Data
            public static class CocDataGroup {
                private String VehicleIdentificationNumber;
                private String StageOfCompletionCode;
                private String TypeApprovalTypeCode;
                private String Type;
                private String Variant;
                private String Version;
                private String RevisionDate;
                private String VehicleCategoryCode;
                private String LocOfTheStatutoryPlatesCode;
                //17
                private String MethodOfAttachmStatPlatesCode;
                private String LocationOfTheVinCode;
                private String TypeApprovalNumber;
                private String TypeApprovalDateOfIssue;
                private String DateOfManufactureVeh;
                private String RightLeftHandTrafficCode;
                private String MetricImperialSpeedometerCode;
                private String NumberOfAxles;
                private String NumberOfWheels;
                private String NumberOfPoweredAxles;
                private String AutomatedVehCode;
                private String Wheelbase;
                private String Length;
                private String Width;
                //31
                private String Height;
                private String MassOfTheVehicleInRunningOrder;
                private String ActualMassOfTheVehicle;
                private String TechnPermMaxLadenMass;
                private String TechnPermMaxMassCombination;
                private String PrimaryColourCode;
                private String NumberOfDoors;
                private String ConfigurationOfDoors;
                private String NrOfSeatingPositions;
                private String Remarks;
                private String IntendedCountryOfRegistrCode;
                private String OdometerUnitCode;
                private String VersionCoc;
                private String VersionDateIVI;
                private String VehicleFittedWithEcoInnovInd;
                private String AllowedEuropeanMarketIndicator;
                private String MaximumNetPowerElectricEngine;
                private String PureElectricVehIndicator;
                //49
                private String MaximumContinuousRatedPowerVeh;

                private SigningAuthorityTable SigningAuthorityTable;

                //body->CocDataGroup->SigningAuthorityTable部分
                @NoArgsConstructor
                @AllArgsConstructor
                @Data
                public static class SigningAuthorityTable {

                    private SigningAuthorityGroup SigningAuthorityGroup;

                    //body->CocDataGroup->SigningAuthorityTable->SigningAuthorityGroup部分
                    @NoArgsConstructor
                    @AllArgsConstructor
                    @Data
                    public static class SigningAuthorityGroup {
                        private String NameOfSigner;
                        private String PositionOfSigner;
                        private String PlaceOfSignature;
                        private String DateOfSignature;
                    }
                }
                //58
                private GearGroup GearGroup;

                @NoArgsConstructor
                @AllArgsConstructor
                @Data
                public static class GearGroup {
                    private String GearboxTypeCode;
                }

                //61
                private List<FinalDriveVehGroup> FinalDriveVehTable;

                @NoArgsConstructor
                @AllArgsConstructor
                @Data
                public static class FinalDriveVehGroup {
                    private String FinalDriveVehNumber;
                    private String FinalDriveRatioVeh;

                }

                //71 MakeTable

                private MakeTable MakeTable;
                @NoArgsConstructor
                @AllArgsConstructor
                @Data
                public static class MakeTable {
                    private MakeGroup MakeGroup;
                    @NoArgsConstructor
                    @AllArgsConstructor
                    @Data
                    public static class MakeGroup {
                        private String Make;
                    }
                }

                //76 CommercialNameTable
                private CommercialNameTable CommercialNameTable;

                @NoArgsConstructor
                @AllArgsConstructor
                @Data
                public static class CommercialNameTable {
                    private CommercialNameGroup CommercialNameGroup;
                    @NoArgsConstructor
                    @AllArgsConstructor
                    @Data
                    public static class CommercialNameGroup {
                        private String CommercialName;
                    }
                }

                //81StageNrOfManufacturingTable

                private StageNrOfManufacturingTable StageNrOfManufacturingTable;

                @NoArgsConstructor
                @AllArgsConstructor
                @Data
                public static class StageNrOfManufacturingTable {
                    private StageNrOfManufacturingGroup StageNrOfManufacturingGroup;
                    @NoArgsConstructor
                    @AllArgsConstructor
                    @Data
                    public static class StageNrOfManufacturingGroup {
                        private List<AddressGroup> AddressTable;
                    }

                    @NoArgsConstructor
                    @AllArgsConstructor
                    @Data
                    public static class AddressGroup {
                        private String AddressTypeCode;
                        private String Name;
                        private String AddressLine1;
                        private String AddressLine3;
                        private String PlaceOfResidence;
                        private String CountryOfResidence;
                    }

                }

                //103BodyworkTable
                private BodyworkTable BodyworkTable;

                @NoArgsConstructor
                @AllArgsConstructor
                @Data
                public static class BodyworkTable {
                    private BodyworkGroup BodyworkGroup;
                    @NoArgsConstructor
                    @AllArgsConstructor
                    @Data
                    public static class BodyworkGroup {
                        private String CodeForBodywork;
                    }
                }

                //108->142AxleTable

                private List<AxleGroup> AxleTable;

                @NoArgsConstructor
                @AllArgsConstructor
                @Data
                public static class AxleGroup {
                    private String AxleNumber;
                    private String PoweredAxleInd;
                    private String AxleTrack;
                    private String TechnicallyPermMassAxle;
                    private String AxleSpacing;

                    private TyreAxleTable TyreAxleTable;

                    @NoArgsConstructor
                    @AllArgsConstructor
                    @Data
                    public static class TyreAxleTable {
                        private TyreAxleGroup TyreAxleGroup;

                        @NoArgsConstructor
                        @AllArgsConstructor
                        @Data
                        public static class TyreAxleGroup {
                            private String TyreSize;
                            private String LoadCapacityIndexSingleWheel;
                            private String SpeedCategorySymbol;
                            private String TyreCategoryCode;
                            private String RimSizeIncludingOffSet;
                            private String RollingResistanceClassCode;
                        }
                    }

                }

                //143->189EngineTable

                private List<EngineGroup> EngineTable;

                @NoArgsConstructor
                @AllArgsConstructor
                @Data
                public static class EngineGroup {
                    private String ManufacturerOfTheEngine;
                    private String EngineCodeAsMarkedOnTheEngine;
                    private String WorkingPrincipleCode;
                    private String ElectricEngineIndicator;
                    private FuelTable FuelTable;
                    @NoArgsConstructor
                    @AllArgsConstructor
                    @Data
                    public static class FuelTable {
                        private FuelGroup FuelGroup;

                        @NoArgsConstructor
                        @AllArgsConstructor
                        @Data
                        public static class FuelGroup {
                            private String MaximumContinuousRatedPower;
                            private String MaximumSpeed;
                            private String SoundLevelDriveBy;
                            private String NrBaseRegulActLastAmendMotVeh;
                            private String MaxNetPowerElectricEngFuel;


                            private TestprocedureWLTPEnergyGroup TestprocedureWLTPEnergyGroup;
                            private String ExhaustEmissionLevelEuro;

                            @NoArgsConstructor
                            @AllArgsConstructor
                            @Data
                            public static class TestprocedureWLTPEnergyGroup {
                                private String WLTPLowElecEnergyConsPureElec;
                                private String WLTPMediumElEnergyConsPureElec;
                                private String WLTPHighElecEnergyConsPureElec;
                                private String WLTPExtrHighElecEnConsPureElec;


                                private String WLTPElecEnergyConsPureElectric;
                                private String WLTPElectricRangePureElectric;
                                private String WLTPElectricRangeCityPureElec;

                            }

                        }

                    }
                }

                //190->198 WLTPEmissionTestParamGroup
                private WLTPEmissionTestParamGroup WLTPEmissionTestParamGroup;

                @NoArgsConstructor
                @AllArgsConstructor
                @Data
                public static class WLTPEmissionTestParamGroup {
                    private String EmisTestMassWLTP;
                    private String FrontalAreaWLTP;
                    private String RoadLoadCoefF0WLTP;
                    private String RoadLoadCoefF1WLTP;
                    private String RoadLoadCoefF2WLTP;
                    private String DrivingCycleClassCode;
                    private String CappedSpeedIndicator;
                }

                //199-208
                private List<TestFamilyIdentifiersGroup> TestFamilyIdentifiersTable;

                @NoArgsConstructor
                @AllArgsConstructor
                @Data
                public static class TestFamilyIdentifiersGroup {
                    private String FamilyIdentifierCode;
                    private String FamilyIdentifierValue;
                }

                //209->213TrailerBrakeTable

                private TrailerBrakeTable TrailerBrakeTable;

                @NoArgsConstructor
                @AllArgsConstructor
                @Data
                public static class TrailerBrakeTable {
                    private TrailerBrakeGroup TrailerBrakeGroup;

                    @NoArgsConstructor
                    @AllArgsConstructor
                    @Data
                    public static class TrailerBrakeGroup {
                        private String TrailerBrakeConnectionsCode;

                    }
                }

                //214->220MechanicalCouplingTable

                private MechanicalCouplingTable MechanicalCouplingTable;

                @NoArgsConstructor
                @AllArgsConstructor
                @Data
                public static class MechanicalCouplingTable {
                    private MechanicalCouplingGroup MechanicalCouplingGroup;

                    @NoArgsConstructor
                    @AllArgsConstructor
                    @Data
                    public static class MechanicalCouplingGroup {
                        private String TechPermMaxTowMassCentAxTrail;
                        private String TechPermMaxTowMassUnbrTrailer;
                        private String TechPermMaxStatVertMassCouplPt;
                    }
                }

                //221->225AdvancedSafetySystemTable

                private List<AdvancedSafetySystemGroup> AdvancedSafetySystemTable;
                @NoArgsConstructor
                @AllArgsConstructor
                @Data
                public static class AdvancedSafetySystemGroup {
                        private String AdvancedSafetySystemCode;
                }

            }

        }

}
